package org.dtrd.config.wechat.config;

/**
 * 微信回调
 *
 * @author xiao
 * @date:2021-12-28
 */
public class WechatCallbackConfig {


    /**
     * 发送状态
     */
    public enum Status {
        /**
         * 发送成功
         */
        SUCCESS("success"),
        /**
         * 用户拒收（用户设置拒绝接收公众号消息）
         */
        USER_BLOCK("failed:user block"),
        /**
         * 其他原因发送失败
         */
        SYSTEM_FAILED("failed: system failed");

        private String status;

        Status(String status) {
            this.status = status;
        }

        public String getEvent() {
            return status;
        }

        public void setEvent(String status) {
            this.status = status;
        }

        public static boolean sendSuccess(String status) {
            return SUCCESS.status.equals(status);
        }

        public static boolean rejectByUser(String status) {
            return USER_BLOCK.status.equals(status);
        }

        public static boolean systemError(String status) {
            return SYSTEM_FAILED.status.equals(status);
        }


    }


}
